<%@ page language="java" contentType="text/html; charset=UTF-8"  pageEncoding="UTF-8"%>
$(function(){
	var storiedBuildingHome = '${user.getStoriedBuilding()}';
	var roleName = $("#roleName").val();
	var studentId = $("#studentId").val();
	var releasePeopleId = $("#releasePeopleId").val();
	var status = $("#status").val();
	if(roleName == "ADMINISTRATOR" || studentId == releasePeopleId){
		$("#hideButton").show();
	}else{
		$("#hideButton").hide();
	}
	if(status == "0"){
		$("#hideButton").hide();
	}
	
	$("#saveButton").click(function(){
		var id = $("#id").val();
		$.messager.confirm({
			title:'提示',
			msg:'确认已经领取了吗?',
			top:30,
			fn:function(r){
				if(r){
					$.ajax({
						type:'POST',
						url:'updaSomethingLostStatus.action',
						data:{id:id,status:0},
						datatype:'json',
						success:function(msg){
							if(msg.status == "200"){
								window.location.href="somethingLostListDatagrid.action";
							}else{
								$.messager.alert("提示","出问题了");
							}
						}
					});
				}
			}
		});
	});
});